PEGetWindowHandle

Use PEGetWindowHandle to retrieve the handle of the preview window. This function can be used in a Custom-Print Link if you want to do something with the preview window (move it, change its size, etc.). PEGetWindowHandle can also be used to determine if the user has already closed the preview window.

C Syntax
HWND CRPE_API PEGetWindowHandle (
        short printJob );
Parameter

printJob

Specifies the print job for which you want to retrieve the preview window handle. If two or more preview windows are open, this function applies only to the most recently created preview window.

Returns
Remarks

This function can be used after PEStartPrintJob, and then, only if you have created a preview window.

VB Syntax

VB Sample Code for Previewing a Report

Declare Function PEGetWindowHandle Lib "crpe32.dll" (
    ByVal printJob As Integer ) As Long
Delphi Syntax
function PEGetWindowHandle (
    pr6intJob: Word
    ): HWnd stdcall;
dBASE for Windows Syntax

EXTERN CHANDLE PEGetWindowHandle (CWORD) CRPE.DLL



Seagate Software IMG Holdings, Inc.
http://www.seagatesoftware.com
Support services:
http://support.seagatesoftware.com